﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

/* Generated with http://xmltocs.com/ */
namespace EDMXParserV1
{
    public class Mapping
    {
        public String Space { get; set; }
        public String Xmlns { get; set; }
        public EntityContainerMapping EntityContainerMapping { get; set; }

        public static Mapping New(System.Xml.XmlNode Node)
        {
            Mapping Mapping = new Mapping();
            foreach (XmlAttribute Attribute in Node.Attributes)
            {
                switch (Attribute.Name)
                {
                    case "Space":
                        Mapping.Space = Attribute.Value;
                        break;
                    case "xmlns":
                        Mapping.Xmlns = Attribute.Value;
                        break;
                    default:
                        Globals.AttributeSwitchCoder(Attribute);
                        break;
                }
            }

            foreach (XmlNode ChildNode in Node.ChildNodes)
            {
                switch (ChildNode.Name)
                {
                    case "EntityContainerMapping":
                        Mapping.EntityContainerMapping = EntityContainerMapping.New(ChildNode);
                        break;

                    default:
                        Globals.NodeSwitchCoder(ChildNode);
                        break;
                }
            }

            return Mapping;
        }
    }
}
